package ebuy.com.util;

import lombok.Data;

@Data
public class RespBean {
    /*    封装返回值     */
    private Integer status;//返回的状态码
     private String msg;//返回的消息
    private Object data;//返回的数据    //成功
    public static  RespBean success(String message){
        return new RespBean(200,message,null);
    }
    public RespBean(){

    }
    public RespBean(Integer status,String msg,Object object){
        this.msg=msg;
        this.status=status;
        this.data=object;
    }
    public static  RespBean success(String message,Object object){
        return new RespBean(200,message,object);
    }

    public static RespBean failure(String message){
    return new RespBean(500,message,null);
    }
    public static RespBean failure(String message,Object object){
    return new RespBean(500,message,object);
}
}
